<?php
declare (strict_types=1);

namespace app\model;

class Discount extends Model
{
    protected $schema = [
        'id'           => 'int',
        'user_id'      => 'int',
        'line_id'      => 'int',
        'discount'     => 'decimal',
        'created_time' => 'int',
        'updated_time' => 'int',
    ];

    public function line()
    {
        return $this->hasOne(Line::class, 'id', 'line_id');
    }
}
